package com.jack006.pojo.validate;


import com.jack006.utils.UrlUtils;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

/**
 * @Classname CheckUrlValidate
 * @Description url 校验器
 * @Date 2021-07-02 21:38
 * @Created by jack
 */
public class CheckUrlValidate implements ConstraintValidator<CheckUrl, String> {

    @Override
    public boolean isValid(String url, ConstraintValidatorContext context) {
        return UrlUtils.verifyUrl(url.trim());
    }
}
